package org.jeecg.modules.golf.tag.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.golf.question.client.QuestionTagAnalysisDTO;
import org.jeecg.modules.golf.question.client.qto.StatisticsQuestionAnalysisQueryDTO;
import org.jeecg.modules.golf.tag.entity.TagMapping;

import java.util.List;
import java.util.Map;

/**
 * @Description: 标签关联表
 * @Author: jeecg-boot
 * @Date:   2020-10-18
 * @Version: V1.0
 */
public interface ITagMappingService extends IService<TagMapping> {

	/**
	 * 查询
	 * @param mainId
	 * @return
	 */
	 List<TagMapping> selectByMainId(Long mainId,Integer mappingType);

	/**
	 * 根据用户id获取分类的标签
	 * @param userid
	 * @return
	 */
	List<Map<String, String>> queryTagByGroup(String userid);

	/**
	 * 批量保存并更新Tag
	 * @param tagMappingList
	 * @return
	 */
	void saveBatch(List<TagMapping> tagMappingList,Long mainId,Integer mappingType);

	/**
	 * 问题标签分析
	 * @param statisticsQuestionAnalysisQueryDTO
	 * @return
	 */
	Page<QuestionTagAnalysisDTO> tagAnalysis(StatisticsQuestionAnalysisQueryDTO statisticsQuestionAnalysisQueryDTO);
}
